<div id="content" class="account">
    <h1><?=$data->TITLE?></h1>
    <h3><?=$data->DESCRIPTION?></h3>
    <?
    foreach ($data->APPS as $i) @include 'apps/'.$i.'/template/_settings.html';
    ?>
    <script type="text/javascript">
        var friend = '<?=$data->settings->friend?>';
        $('.lineItem').each(function(){
            var level = $('<span>',{'class':'level'}).prependTo($(this));
            var select = $('<select>',{'name':$(this).attr('id')}).appendTo(level);
            var data = eval('(' + $(this).attr('title') + ')');
            $.each(data.options, function(name, value){
                if(value != 'friends' || friend)
                    $('<option>',{'selected':(data.value==value)}).val(value).html(name).appendTo(select);
            });
            select.change(function(){
                tool.post({'url':'/json/<?=LANG?>/<?=APP?>/<?=CMD?>','data':'name='+$(this).attr('name')+'&value='+$(this).val()});
            });
        });

    </script>
    <div class="clear"></div>
</div>
<div id="aside"></div>